php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#242591 - 04/14/03 01:28 AM [6.2] Alt Body Preview of a Thread 1.0
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Mod Name: Alt Body Preview 1.0 <br /> <br />Description: As you mouse over the subjects on the postlist page, the tool tip will pop up and show you the list of the first 100 characters of the post. <br /> <br />Author: extremebikini <br /> <br />Credits: written up by JoshPet <br /> <br />Date: 1/30/03 <br /> <br />Demo: It's in use here... check out the postlist page. <br /> <br />Working Under: 6.2 <br /> <br />Files Modified: postlist.php, postlist.tmpl <br /> <br />New Files: none <br /> <br />Database Modifications: None <br /> <br />Note: I take no credit for this. Michael (extremebikini) created it, but the thread where it got created got confused, and most folks couldn't extract the directions from the thread. I'm just good at writing them up. <img src="/forum/images/graemlins/grin.gif" alt="" />


Attachments
75631-AltBodyPreview1.0.txt (90 downloads)

_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#242592 - 04/14/03 04:04 PM why? [Re: Daine]
Slawek_L Offline
Enthusiast

Registered: 01/28/03
Posts: 364
Loc: Poland, Warsaw
Why this hack dont work in[6.1.1] ??? I cant understand this. I did all steps and nothing <img src="/forum/images/graemlins/frown.gif" alt="" /> What is add to 6.2 that allready work correctly? Please tell me...
_________________________
[]http://www.mb.org.pl/forum/images/graemlins/icon_astro.gif[/] MB Klub Polska
[b]& Orlen-Team

Top
#242593 - 04/14/03 04:10 PM Re: why? [Re: Dawg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Well.. you can't use the whole lins, as the Database field names are somewhat different in 6.1. In 6.2 several of the DB fields were dropped in relation to the Username thing.<br /><br />You'd need to add the bits U_Body and $Body to the end of the lines like those.... but you won't find those lines in 6.1.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#242594 - 04/14/03 04:50 PM Re: why? [Re: Daine]
Slawek_L Offline
Enthusiast

Registered: 01/28/03
Posts: 364
Loc: Poland, Warsaw
Yes, I added only t1.B_Body and $body, not whole lines...<br />It doesnt work far.
_________________________
[]http://www.mb.org.pl/forum/images/graemlins/icon_astro.gif[/] MB Klub Polska
[b]& Orlen-Team

Top
#242595 - 04/14/03 05:51 PM Re: why? [Re: Dawg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Make sure you used $Body. Variables are case sensitive. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br />For 6.1.1. I think you'd need to change this:<br /><br /> $query = "<br /> SELECT t1.B_Number,t1.B_Parent,t1.B_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,<br />t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Sticky,<br />t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File<br /><br /><br />To this:<br /><br /> $query = "<br /> SELECT t1.B_Number,t1.B_Parent,t1.B_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,<br />t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Sticky,<br />t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t1.B_Body<br /><br /><br />And this:<br /><br /> list($Number,$Parent,$Username,$Posted,$Last_Post,$Subject,<br />$Main,$Open,$Approved,$icon,$Reged,$Counter,$Sticky,$Replies,$Rating,<br />$Rates,$stars,$Color,$PostStatus,$posterid,$file) = $dbh -> fetch_array($sth);<br /><br /> // -------------------------<br /> // Standard icon is the note<br /> if (!$icon) {<br /> $icon = "book.gif";<br /> }<br /><br /><br />To this:<br /><br /> list($Number,$Parent,$Username,$Posted,$Last_Post,$Subject,<br />$Main,$Open,$Approved,$icon,$Reged,$Counter,$Sticky,$Replies,$Rating,<br />$Rates,$stars,$Color,$PostStatus,$posterid,$file,$Body) = $dbh -> fetch_array($sth);<br /><br /> // -------------------------<br /> // Standard icon is the note<br /> if (!$icon) {<br /> $icon = "book.gif";<br /> }<br /><br />// -------------------<br />// Limit the number of characters in the Body - by extremebikini<br /> $Body = strip_tags($Body);<br /> $Body = htmlspecialchars($Body);<br /> if ( strlen($Body) > 100 ) {<br /> $Body = substr($Body, 0, 100);<br /> $Body .= " ...";<br /> }<br /><br /><br /><br />The postrow[$z] step and the changes to the tmpl file are the same. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br /><br />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#242596 - 04/15/03 10:54 AM Re: why? [Re: Daine]
Slawek_L Offline
Enthusiast

Registered: 01/28/03
Posts: 364
Loc: Poland, Warsaw
hmm... I think that I did exactly You wrote, but it doent work <img src="/forum/images/graemlins/frown.gif" alt="" /> <img src="/forum/images/graemlins/blush.gif" alt="" /> <img src="/forum/images/graemlins/confused.gif" alt="" />
_________________________
[]http://www.mb.org.pl/forum/images/graemlins/icon_astro.gif[/] MB Klub Polska
[b]& Orlen-Team

Top
#242597 - 04/15/03 11:50 AM Re: why? [Re: Dawg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
You had $body instead of $Body. <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#242598 - 04/15/03 12:15 PM Re: why? [Re: Daine]
Slawek_L Offline
Enthusiast

Registered: 01/28/03
Posts: 364
Loc: Poland, Warsaw
Ok.. I see... <img src="/forum/images/graemlins/blush.gif" alt="" />
_________________________
[]http://www.mb.org.pl/forum/images/graemlins/icon_astro.gif[/] MB Klub Polska
[b]& Orlen-Team

Top
#242599 - 04/15/03 01:03 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: Daine]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
thanks for the writeup josh <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top
#242600 - 04/15/03 02:10 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: SurfMinister]
ZealotOnAStick_dup1 Offline
Member

Registered: 06/14/02
Posts: 166
Loc: Indiana
Yes, thank you very much for consolidating and clarifying this.

Top
#242601 - 04/15/03 02:32 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: astre]
PhotoPost Offline
Hacker

Registered: 02/03/02
Posts: 989
Yes, thanks Josh!<br /><br />:lol:
_________________________
[]http://www.danasoft.com/vipersig.jpg[/]
Viper Alley - http://www.viperalley.com
Extreme Fitness - http://www.extremefitness.com[/b]

Top
#242602 - 04/15/03 08:35 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: Daine]
ZealotOnAStick_dup1 Offline
Member

Registered: 06/14/02
Posts: 166
Loc: Indiana
Uhm, something of a problem with your direction - the text you have listed for some of the replacements seems to presume that the "Last Post By" mod is installed, as it speficially references database elements unique to that script. I tried installing the Alt Body Preview mod, and didn't have the Last Post By mod installed, and it wreaked all havoc and generated major mysql errors.<br /><br />As a suggestion, either clean up the instructions to not list those please, or list the Last Post By mod as a pre-req.

Top
#242603 - 04/15/03 08:54 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: astre]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
>>As a suggestion, either clean up the instructions to not list those please, or list the Last Post By mod as a pre-req.<br /><br />Duh <img src="/forum/images/graemlins/smirk.gif" alt="" /><br /><br />LastPost mod should NOT be a requirement for this. I thought I had made this using a clean copy of 6.2. But let me check. I might have used a clean copy of 6.3.<br /><br />At a glance I don't see it. What error did you get or what step do you think has LastPost by code? The 6.2 version or the 6.1 version?
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#242604 - 04/15/03 09:25 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: Daine]
ZealotOnAStick_dup1 Offline
Member

Registered: 06/14/02
Posts: 166
Loc: Indiana
Here's an example of what I was getting for postlist.php after trying to install this mod as it's documented: <br /> <br />Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Last_Number,t1.B_Last_Name,t1.B_Last_Approved,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_Body FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'main' AND t1.B_PosterId = t2.U_Number AND (t1.B_Last_Post > 1049229624 OR t1.B_Sticky = '1') ORDER BY t1.B_Sticky DESC,t1.B_Last_Post DESC LIMIT 21 - Unknown column 't1.B_Last_Number' in 'field list' <br /> <br />The version I was using was the original attachment, which I believe is the 6.2 version.


Edited by ZealotOnAStick (04/15/03 09:27 PM)

Top
#242605 - 04/15/03 09:29 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: astre]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
[]ZealotOnAStick said:<br />As a suggestion, either clean up the instructions to not list those please, or list the Last Post By mod as a pre-req. [/]<br /><br />As a suggestion... don't make suggestions unless you know what you're talking about. <img src="/forum/images/graemlins/smirk.gif" alt="" /> Particularly when someone took the time out of a busy day to put them together for others (you) who had difficulty following the other posted instructions.<br /><br />I just double checked again... <br />These instructions are written for a clean copy of 6.2.3. There is no Last Post by hack code that I see in the attached instructions.<br /><br />If you can be more specific than "wreaked all havoc" (post errors you receive etc...) I might be able to help you get it installed if I have time to do so. Otherwise my assumption is that you did it wrong.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#242606 - 04/15/03 09:32 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: Daine]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
This is the query you are doing:<br /><br />SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Last_Number,t1.B_Last_Name,t1.B_Last_Approved,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_Body<br /><br />This is the query in my instructions:<br /><br /> SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_Body<br /><br /><br /><br />You are trying to query last post by mod fields.... but they are not in my instructions. The word "last" appears in the attachment only 4 times. <br /><br />You did it wrong. Start with a fresh copy and try again.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#242607 - 04/15/03 09:34 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: Daine]
ZealotOnAStick_dup1 Offline
Member

Registered: 06/14/02
Posts: 166
Loc: Indiana
My apologies, then. Something got screwed up somewhere.

Top
#242608 - 04/15/03 09:40 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: Daine]
ZealotOnAStick_dup1 Offline
Member

Registered: 06/14/02
Posts: 166
Loc: Indiana
[] As a suggestion... don't make suggestions unless you know what you're talking about. Particularly when someone took the time out of a busy day to put them together for others (you) who had difficulty following the other posted instructions. [/] <br /><br />Sorry. I'm very frazzled after spending a couple of hours repairing things after I managed to do whatever it was I did to screw things up so badly on the HP forums. I've taken flak from one of the other users, and I managed to hit the wrong tab on a paste, and promptly overwrite the backup of postlist.php I'd made before starting the mod. I didn't mean to be rude to you.

Top
#242609 - 04/15/03 09:47 PM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: astre]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
<br />Accepted. I understand.<br /><br />A bunch of us donate our time here and post stuff for others to use, purely because we want to be helpful and for the good of the "community". <br /><br />It's discouraging when people criticize you for doing so... makes it seem alot easier to keep your mods to yourself so that you don't need help people and take abuse.<br /><br />We don't want that to happen as the more mods shared, the more mods that get posted, the more cool toys we get to play with.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#242610 - 04/16/03 12:01 AM Re: [6.2] Alt Body Preview of a Thread 1.0 [Re: Daine]
Storm_dup1 Offline
Member

Registered: 08/03/02
Posts: 263
Loc: Somewhere above Texas
I'm glad you said that Josh.... <br /><br />Being a non-programmer for sure, you have helped me out pretty much every time I've been lost and I've watched you and the others do the same. Chuck helped me with something as well. Good thing there are a lot more of us out here who are thankful for all the stuff you all do than what we saw above.... <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Some people read their stars..... I choose to write my own

Top
Page 1 of 2 1 2 >



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks